(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

walk#1(Leaf(x2)) → cons_x(x2)
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x(x2), x4) → comp_f_g#1(x7, x9, Cons(x2, x4))
comp_f_g#1(cons_x(x2), comp_f_g(x5, x7), x3) → Cons(x2, comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x(x5), cons_x(x2), x4) → Cons(x5, Cons(x2, x4))
main(Leaf(x4)) → Cons(x4, Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

walk#1(Leaf(x2)) → cons_x(x2)
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x(x2), x4) → comp_f_g#1(x7, x9, Cons(x2, x4))
comp_f_g#1(cons_x(x2), comp_f_g(x5, x7), x3) → Cons(x2, comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x(x5), cons_x(x2), x4) → Cons(x5, Cons(x2, x4))
main(Leaf(x4)) → Cons(x4, Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

S is empty.
Rewrite Strategy: INNERMOST

(3) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
Leaf/0
cons_x/0
Cons/0

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

S is empty.
Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
walk#1, comp_f_g#1

(8) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

Generator Equations:
gen_cons_x:comp_f_g4_0(0) ⇔ cons_x
gen_cons_x:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node5_0(x))
gen_Cons:Nil6_0(0) ⇔ Nil
gen_Cons:Nil6_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil6_0(x))

The following defined symbols remain to be analysed:
walk#1, comp_f_g#1

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

Induction Base:
walk#1(gen_Leaf:Node5_0(0)) →RΩ(1)
cons_x

Induction Step:
walk#1(gen_Leaf:Node5_0(+(n8_0, 1))) →RΩ(1)
comp_f_g(walk#1(Leaf), walk#1(gen_Leaf:Node5_0(n8_0))) →RΩ(1)
comp_f_g(cons_x, walk#1(gen_Leaf:Node5_0(n8_0))) →IH
comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(c9_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

Lemmas:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

Generator Equations:
gen_cons_x:comp_f_g4_0(0) ⇔ cons_x
gen_cons_x:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node5_0(x))
gen_Cons:Nil6_0(0) ⇔ Nil
gen_Cons:Nil6_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil6_0(x))

The following defined symbols remain to be analysed:
comp_f_g#1

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
comp_f_g#1(gen_cons_x:comp_f_g4_0(0), gen_cons_x:comp_f_g4_0(n155_0), gen_Cons:Nil6_0(c)) → gen_Cons:Nil6_0(+(+(2, n155_0), c)), rt ∈ Ω(1 + n1550)

Induction Base:
comp_f_g#1(gen_cons_x:comp_f_g4_0(0), gen_cons_x:comp_f_g4_0(0), gen_Cons:Nil6_0(c)) →RΩ(1)
Cons(Cons(gen_Cons:Nil6_0(c)))

Induction Step:
comp_f_g#1(gen_cons_x:comp_f_g4_0(0), gen_cons_x:comp_f_g4_0(+(n155_0, 1)), gen_Cons:Nil6_0(c)) →RΩ(1)
Cons(comp_f_g#1(cons_x, gen_cons_x:comp_f_g4_0(n155_0), gen_Cons:Nil6_0(c))) →IH
Cons(gen_Cons:Nil6_0(+(+(2, c), c156_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

Lemmas:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)
comp_f_g#1(gen_cons_x:comp_f_g4_0(0), gen_cons_x:comp_f_g4_0(n155_0), gen_Cons:Nil6_0(c)) → gen_Cons:Nil6_0(+(+(2, n155_0), c)), rt ∈ Ω(1 + n1550)

Generator Equations:
gen_cons_x:comp_f_g4_0(0) ⇔ cons_x
gen_cons_x:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node5_0(x))
gen_Cons:Nil6_0(0) ⇔ Nil
gen_Cons:Nil6_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil6_0(x))

No more defined symbols left to analyse.

(15) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

(16) BOUNDS(n^1, INF)

(17) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

Lemmas:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)
comp_f_g#1(gen_cons_x:comp_f_g4_0(0), gen_cons_x:comp_f_g4_0(n155_0), gen_Cons:Nil6_0(c)) → gen_Cons:Nil6_0(+(+(2, n155_0), c)), rt ∈ Ω(1 + n1550)

Generator Equations:
gen_cons_x:comp_f_g4_0(0) ⇔ cons_x
gen_cons_x:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node5_0(x))
gen_Cons:Nil6_0(0) ⇔ Nil
gen_Cons:Nil6_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil6_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

(19) BOUNDS(n^1, INF)

(20) Obligation:

Innermost TRS:
Rules:
walk#1(Leaf) → cons_x
walk#1(Node(x5, x3)) → comp_f_g(walk#1(x5), walk#1(x3))
comp_f_g#1(comp_f_g(x4, x5), comp_f_g(x2, x3), x1) → comp_f_g#1(x4, x5, comp_f_g#1(x2, x3, x1))
comp_f_g#1(comp_f_g(x7, x9), cons_x, x4) → comp_f_g#1(x7, x9, Cons(x4))
comp_f_g#1(cons_x, comp_f_g(x5, x7), x3) → Cons(comp_f_g#1(x5, x7, x3))
comp_f_g#1(cons_x, cons_x, x4) → Cons(Cons(x4))
main(Leaf) → Cons(Nil)
main(Node(x9, x5)) → comp_f_g#1(walk#1(x9), walk#1(x5), Nil)

Types:
walk#1 :: Leaf:Node → cons_x:comp_f_g
Leaf :: Leaf:Node
cons_x :: cons_x:comp_f_g
Node :: Leaf:Node → Leaf:Node → Leaf:Node
comp_f_g :: cons_x:comp_f_g → cons_x:comp_f_g → cons_x:comp_f_g
comp_f_g#1 :: cons_x:comp_f_g → cons_x:comp_f_g → Cons:Nil → Cons:Nil
Cons :: Cons:Nil → Cons:Nil
main :: Leaf:Node → Cons:Nil
Nil :: Cons:Nil
hole_cons_x:comp_f_g1_0 :: cons_x:comp_f_g
hole_Leaf:Node2_0 :: Leaf:Node
hole_Cons:Nil3_0 :: Cons:Nil
gen_cons_x:comp_f_g4_0 :: Nat → cons_x:comp_f_g
gen_Leaf:Node5_0 :: Nat → Leaf:Node
gen_Cons:Nil6_0 :: Nat → Cons:Nil

Lemmas:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

Generator Equations:
gen_cons_x:comp_f_g4_0(0) ⇔ cons_x
gen_cons_x:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(cons_x, gen_cons_x:comp_f_g4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node5_0(x))
gen_Cons:Nil6_0(0) ⇔ Nil
gen_Cons:Nil6_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil6_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Leaf:Node5_0(n8_0)) → gen_cons_x:comp_f_g4_0(n8_0), rt ∈ Ω(1 + n80)

(22) BOUNDS(n^1, INF)